﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminIndexMaster.master" AutoEventWireup="true" CodeFile="Admin_Log.aspx.cs" Inherits="Admin_Admin_Log" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script src="Js/Function.js" type="text/javascript"></script>
    <table class="adminheading">
        <tr>
            <th align="left" class="user">管理员操作日志管理</th>
            <td align="right">
                <div style="width: 500px; text-align: right;" >
                </div>
            </td>           
        </tr>
    </table>
    
    <asp:GridView id="GridView1" runat="server" CssClass="adminlist" EnableViewState="False" OnRowDataBound="GridView1_RowDataBound" DataKeyNames="LogID" AutoGenerateColumns="False" >
        <Columns>
        <asp:TemplateField>
            <HeaderTemplate>
                <input type="checkbox" id="selectall" onclick="SelectAllCheckboxes(this,'IDs')" />
            </HeaderTemplate>
            <ItemTemplate>
                <input type="checkbox" name="IDs" id="IDs" value="<%# Eval("LogID") %>" />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="OperaTime" HeaderText="时间" />
        <asp:BoundField DataField="Operator" HeaderText="操作人" />
        <asp:BoundField DataField="OperatorIP" HeaderText="IP" />
        <asp:TemplateField  HeaderText="类型">
             <ItemTemplate>
                <asp:Literal ID="LitLogType" Text='<%# Eval("LogType") %>' runat="server" />
             </ItemTemplate>
             <HeaderStyle Width="15%" />
        </asp:TemplateField>
        <asp:BoundField DataField="AppModule" HeaderText="模块"/>
        <asp:BoundField DataField="OperatObject" HeaderText="描述"/>
        <asp:TemplateField HeaderText="操作">
        <ItemTemplate>
           <asp:LinkButton id="btnDelete" runat="server" OnCommand="DeleteLog" Text="删除" CommandName='<%# Eval("LogID") %>' OnClientClick="return confirm('确定删除吗?')"/> 
        </ItemTemplate>
        </asp:TemplateField>
        </Columns>
        <EmptyDataTemplate>
            暂无记录
        </EmptyDataTemplate>
    </asp:GridView>
    <div style="text-align:center; margin-top:5px;"><asp:Label ID="PagePanel" runat="server" /></div>
    <div style="text-align:center; margin:5px;">
        <asp:Button ID="Button1" runat="server" Text="批量删除" OnClick="DeleteAllLog" OnClientClick="return confirm('系统自动保留一天内数据！确定删除吗？')"/>
        
        删除<asp:TextBox ID="Days" runat="server" Width="40px" />天前记录<asp:Button ID="Button2" OnCommand="DeleteLogByDate" runat="server" Text=" 确 定 " OnClientClick="return confirm('系统自动保留一天内数据！确定删除吗？')" />
    </div>
    
</asp:Content>